package com.yuanyefu.helloworld;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * Created by Administrator on 2017/9/16 0016.
 */
public class WhereAmI implements ApplicationContextAware {
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("name "+applicationContext.getApplicationName());
        System.out.println("id "+applicationContext.getId());
        System.out.println("displayName "+applicationContext.getDisplayName());
    }
}
